<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>event_focus</title>
<script src='../lib/jquery-2.1.1.js'></script>
<script>
$(document).ready(function(){
	$('#mid').focus(function(){
		$('#midOutput').val('영숫자만 입력하세요.');
	});
	$('#irum').focus(function(){
		$('#irumOutput').val('한글, 영문자만 입력하세요.');
	});
	
	
	//포커스를 잃었을때
	$('#mid').blur(function(){
		$('#midOutput').val('');
	});	
	
	$('#irum').blur(function(){
		$('#irumOutput').val('');
	});	
});

</script>
</head>
<body>

<label>아이디</label>
<input type='text' id='mid' placeholder='영숫자만 입력'>
<output id='midOutput'></output><br/>

<label>성명</label>
<input type='text' id='irum' placeholder='한글 영문만 입력'>
<output id='irumOutput'></output>


</body>
</html>